package sv.gob.mh.dgii.model;

// Generated 06-10-2011 08:49:21 AM by Hibernate Tools 3.2.5.Beta

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * GdUsuarios generated by hbm2java
 */
@Entity
@Table(name = "GD_USUARIOS",schema="GDOCCALIDAD")
public class GdUsuarios implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private String cusuario;
	private GdPerfiles gdPerfiles;
	private String nit;
	private Boolean badmCalidad;
	private Boolean bjefeUnidad;
	private String cusuModif;
	private Date fmodif;
	private Set<GdHDocCambios> gdHDocCambioses = new HashSet<GdHDocCambios>(0);
	private Set<GdHDocTec> gdHDocTecs = new HashSet<GdHDocTec>(0);

	public GdUsuarios() {
	}

	public GdUsuarios(String cusuario, GdPerfiles gdPerfiles, String nit,
			String cusuModif) {
		this.cusuario = cusuario;
		this.gdPerfiles = gdPerfiles;
		this.nit = nit;
		this.cusuModif = cusuModif;
	}

	public GdUsuarios(String cusuario, GdPerfiles gdPerfiles, String nit,
			Boolean badmCalidad, Boolean bjefeUnidad, String cusuModif,
			Date fmodif, Set<GdHDocCambios> gdHDocCambioses,
			Set<GdHDocTec> gdHDocTecs) {
		this.cusuario = cusuario;
		this.gdPerfiles = gdPerfiles;
		this.nit = nit;
		this.badmCalidad = badmCalidad;
		this.bjefeUnidad = bjefeUnidad;
		this.cusuModif = cusuModif;
		this.fmodif = fmodif;
		this.gdHDocCambioses = gdHDocCambioses;
		this.gdHDocTecs = gdHDocTecs;
	}

	@Id
	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "I_PERFIL", nullable = false)
	public GdPerfiles getGdPerfiles() {
		return this.gdPerfiles;
	}

	public void setGdPerfiles(GdPerfiles gdPerfiles) {
		this.gdPerfiles = gdPerfiles;
	}

	@Column(name = "NIT", nullable = false, length = 14)
	public String getNit() {
		return this.nit;
	}

	public void setNit(String nit) {
		this.nit = nit;
	}

	@Column(name = "B_ADM_CALIDAD", nullable = true, precision = 1, scale = 0)
	public Boolean getBadmCalidad() {
		return this.badmCalidad;
	}

	public void setBadmCalidad(Boolean badmCalidad) {
		this.badmCalidad = badmCalidad;
	}

	@Column(name = "B_JEFE_UNIDAD", nullable = true, precision = 1, scale = 0)
	public Boolean getBjefeUnidad() {
		return this.bjefeUnidad;
	}

	public void setBjefeUnidad(Boolean bjefeUnidad) {
		this.bjefeUnidad = bjefeUnidad;
	}

	@Column(name = "C_USU_MODIF", nullable = false, length = 30)
	public String getCusuModif() {
		return this.cusuModif;
	}

	public void setCusuModif(String cusuModif) {
		this.cusuModif = cusuModif;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "F_MODIF", length = 7)
	public Date getFmodif() {
		return this.fmodif;
	}

	public void setFmodif(Date fmodif) {
		this.fmodif = fmodif;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "gdUsuarios")
	public Set<GdHDocCambios> getGdHDocCambioses() {
		return this.gdHDocCambioses;
	}

	public void setGdHDocCambioses(Set<GdHDocCambios> gdHDocCambioses) {
		this.gdHDocCambioses = gdHDocCambioses;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "gdUsuarios")
	public Set<GdHDocTec> getGdHDocTecs() {
		return this.gdHDocTecs;
	}

	public void setGdHDocTecs(Set<GdHDocTec> gdHDocTecs) {
		this.gdHDocTecs = gdHDocTecs;
	}
}
